﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CSharpAlgorithm
{
    class TestConsole
    {
        private static int cmdLine = 0;
        private static string input =
@"4 6
1 2 3
2 3 3
3 4 1
1 3 5
2 4 5
1 4 4
2 3
";

        private static string[] inputList = null;
        public static string ReadLine()
        {
            if (inputList == null)
            {
                inputList = input.Split(new char[] {'\n'});
            }
            if (cmdLine < inputList.Length)
            {
                return inputList[cmdLine++];
            }
            else
            {
                return string.Empty;
            }
        }
    }
}
